#ifndef PICKONEDLG_H
#define PICKONEDLG_H

#include <QWidget>
#include <QTableView>
#include <QSqlQueryModel>

class PickOneDlg : public QWidget
{
    Q_OBJECT
public:
    explicit PickOneDlg(QWidget *parent = nullptr);

    void updateModel(const QString &recs);

private slots:
    void on_doubleClicked(const QModelIndex &index);
signals:
    void picked(const QString &goodsId);

private:
    void setLists(const QString& in);
private:
    QTableView *m_tableView;
    QSqlQueryModel *m_sqlModel;
    QStringList m_goodsIdList;
    QStringList m_goodsNameList;
};

#endif // PICKONEDLG_H
